auto merge of #673 : alexcrichton/cargo/issue-665, r=brson
authorbors <bors@rust-lang.org>
Tue, 7 Oct 2014 01:15:02 +0000 (01:15 +0000)
committerbors <bors@rust-lang.org>
Tue, 7 Oct 2014 01:15:02 +0000 (01:15 +0000)
Otherwise the order was nondeterministic likely due to some hash map along the
way being used to deduplicate the set of features.

Closes #665

1  2 
src/cargo/ops/cargo_rustc/fingerprint.rs

index 9accddf6602d459cc441fa14498bb3fe23a58c49,6e7cff5f8efa466980d647769ce4a442e1fa9967..43a7adab9cf73487befb80bfd7b04d3ee79bf488
@@@ -240,24 -244,14 +244,24 @@@ fn calculate_target_fresh(pkg: &Package
      }));
      let deps = line.slice_from(pos + 2);
  
 -    for file in deps.split(' ').map(|s| s.trim()).filter(|s| !s.is_empty()) {
 -        match fs::stat(&pkg.get_root().join(file)) {
 +    let mut deps = deps.split(' ').map(|s| s.trim()).filter(|s| !s.is_empty());
 +    loop {
 +        let mut file = match deps.next() {
 +            Some(s) => s.to_string(),
 +            None => break,
 +        };
 +        while file.as_slice().ends_with("\\") {
 +            file.pop();
 +            file.push(' ');
 +            file.push_str(deps.next().unwrap())
 +        }
 +        match fs::stat(&pkg.get_root().join(file.as_slice())) {
              Ok(stat) if stat.modified <= mtime => {}
              Ok(stat) => {
-                 debug!("stale: {} -- {} vs {}", file, stat.modified, mtime);
+                 info!("stale: {} -- {} vs {}", file, stat.modified, mtime);
                  return Ok(false)
              }
-             _ => { debug!("stale: {} -- missing", file); return Ok(false) }
+             _ => { info!("stale: {} -- missing", file); return Ok(false) }
          }
      }